#ifndef __BASETYPEDEFIN_H__
#define __BASETYPEDEFIN_H__

#include <string>
#include <sstream>

using namespace std;

typedef wstring str;
typedef basic_istringstream<wchar_t> iwstrstream;
typedef basic_stringstream<wchar_t> wstrstream;

template<typename T>
T WStringTo(wstring pStr)
{
	T pNumber;
	iwstrstream myStream( pStr );

	myStream >> pNumber;
	return pNumber;
};

template<typename T>
T StringTo(string pStr)
{
	T pNumber;
	istringstream myStream( pStr );

	myStream >> pNumber;
	return pNumber;
};

template<typename T>
wstring ToWString(T pValue)
{
	wstring tempStr;
	iwstrstream out;

	out << pValue;
	tempStr.assign( out.str() );
	return tempStr;
};

template<typename T>
string ToString(T pValue)
{
	string tempStr;
	stringstream out;

	out << pValue;
	tempStr.assign( out.str() );
	return tempStr;
};

long giveNumberWithoutZero(long pValue);

#endif __BASETYPEDEFIN_H__